package com.navinfo.platform.trip.common.arithmetic;

import com.navinfo.platform.trip.common.arithmetic.data.OuterStatisticData;
import com.navinfo.platform.trip.common.arithmetic.var.VarCalcNumber;
import com.navinfo.platform.trip.common.arithmetic.manager.AbstractArithmetic;

/**
 * 急转弯算法，根据0200状态位，来计算次数<br/>
 * 输出：统计<br/>
 */
public class SharpTurning extends AbstractArithmetic<VarCalcNumber> {
    @Override
    public void calculate() {
        // 当前点是否打开
        Boolean[] statusArr = new Boolean[]{getCommonData().isSharpTurning()};
        getObj().calc(statusArr);
    }


    @Override
    public void collect(OuterStatisticData statisticDataOut) {
        VarCalcNumber var = getObj().init(1);
        statisticDataOut.setSharpTurningNumber(var.getNumber()[0]);
        //不支持急转弯距离计算
        statisticDataOut.setSharpTurningMil(null);
    }
}
